#pragma once

#include <wininet.h>

class CInternetHandle
{
	public:
		explicit CInternetHandle(HINTERNET p_hInternet): m_hInternet(p_hInternet)
		{
		}
		~CInternetHandle()
		{
			::InternetCloseHandle(m_hInternet);
		}
		operator const HINTERNET() const
		{
			return m_hInternet;
		}
	protected:
		const HINTERNET m_hInternet;
};
